-
Notifications
You must be signed in to change notification settings - Fork 0
Version In Help #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version In Help #33
Conversation
Stack
Managed by gh-stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds the --version flag to the help output and ensures it always exits with code 0, even when version detection fails. The changes prevent confusing parse errors by making --version consistently terminate the program.
Changes:
- Modified
--versionhandling to always callprocess.exit(0), even when version detection fails - Added
--versionto the help text options schema with description "Show version number" - Updated comment to reflect that built-in options (not just completion-script) are being added
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also fixes --version to always exit (with code 0) even when version detection fails, preventing confusing parse errors. Note: Testing --version/--help behavior is intentionally excluded from coverage as these paths call process.exit().
d73ff0e to
5339a3c
Compare
- Add --help to help output for consistency with --version - Print 'Version information not available' when version detection fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also fixes --version to always exit (with code 0) even when version
detection fails, preventing confusing parse errors.
Note: Testing --version/--help behavior is intentionally excluded from
coverage as these paths call process.exit().